put the visible of background button "cm" into units
put " " before units
put the visible of background button "kgs" before units
put units into field "units"
end CloseCard
-- part 5 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=241 top=317 right=342 bottom=268
-- title width / last selected line: 0
-- icon id / first selected line: 1014 / 1014
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Prev
----- HyperTalk script -----
on mouseUp
visual effect wipe right
go to previous card
end mouseUp
-- part 6 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=267 top=317 right=342 bottom=294
-- title width / last selected line: 0
-- icon id / first selected line: 1013 / 1013
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Next
----- HyperTalk script -----
on mouseUp
visual effect wipe left
go to next card
end mouseUp
-- part 7 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=475 top=314 right=342 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 1012 / 1012
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Return
----- HyperTalk script -----
on mouseUp
visual effect iris close
pop card
end mouseUp
-- part 8 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=0 top=313 right=342 bottom=32
-- title width / last selected line: 0
-- icon id / first selected line: 21700 / 21700
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Home
----- HyperTalk script -----
on mouseUp
visual effect iris open
go Home
end mouseUp
-- part 9 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=139 top=0 right=16 bottom=304
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 20
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: name
-- part 10 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=437 top=0 right=16 bottom=496
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 20
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: birth date
-- part 11 (field)
-- low flags: 01
-- high flags: 4007
-- rect: left=8 top=49 right=258 bottom=69
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 20
-- text size: 10
-- style flags: 1024
-- line height: 13
-- part name: date
-- part 12 (field)
-- low flags: 01
-- high flags: 4007
-- rect: left=79 top=49 right=258 bottom=130
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 20
-- text size: 10
-- style flags: 1024
-- line height: 13
-- part name: age
-- part 13 (field)
-- low flags: 01
-- high flags: 4007
-- rect: left=139 top=49 right=258 bottom=193
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 20
-- text size: 10
-- style flags: 1024
-- line height: 13
-- part name: weight
-- part 14 (field)
-- low flags: 01
-- high flags: 4007
-- rect: left=200 top=49 right=258 bottom=254
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 20
-- text size: 10
-- style flags: 1024
-- line height: 13
-- part name: height
-- part 18 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=407 top=0 right=16 bottom=437
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 20
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: sex
-- part 21 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=305 top=0 right=16 bottom=407
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 20
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: hospital number
-- part 24 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=465 top=39 right=54 bottom=504
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 20
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: fh
-- part 25 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=465 top=54 right=69 bottom=504
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 20
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: mh
-- part 26 (field)
-- low flags: 01
-- high flags: 4007
-- rect: left=260 top=49 right=258 bottom=314
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 20
-- text size: 10
-- style flags: 1024
-- line height: 13
-- part name: growth velocity
-- part 29 (field)
-- low flags: 81
-- high flags: 4007
-- rect: left=260 top=49 right=258 bottom=314
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 20
-- text size: 10
-- style flags: 1024
-- line height: 13
-- part name: bone ages
-- part 31 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=260 top=25 right=49 bottom=309
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 20
-- text size: 10
-- style flags: 256
-- line height: 11
-- part name: title
-- part 33 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=422 top=74 right=89 bottom=443
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 20
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: minimum interval
-- part 36 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=489 top=79 right=96 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: OK
----- HyperTalk script -----
on mouseUp
hide field "minimum interval"
hide field "interval title"
hide background button "ok"
hide field "yrs conversion"
end mouseUp
-- part 37 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=442 top=74 right=89 bottom=489
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 20
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: interval title
-- part 38 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=422 top=88 right=101 bottom=483
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 20
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: yrs conversion
-- part 41 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=30 top=316 right=342 bottom=59
-- title width / last selected line: 0
-- icon id / first selected line: 32462 / 32462
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Comments
----- HyperTalk script -----
on mousedown
global identification
put the mouseloc into myPlace
put item 1 of myPlace - 13 into horiz
put item 2 of myPlace - 100 into vert
put field "name" && field "hospital number" into identification
get PopUpMenu("About this stack;Instructions;Velocity Calculations;Age Calculations;Units of measure;Alignment of data", 1, vert, horiz)
put it into Menuitem
if menuitem is 1 then
go card "comment 5"
end if
if menuitem is 2 then
go card "comment 4"
end if
if menuitem is 3 then
go card "comment 3"
end if
if menuitem is 4 then
go card "comment 2"
end if
if menuitem is 5 then
go card "comment1"
end if
if menuitem is 6 then
go card "comment 6"
end if
end mousedown
-- part 43 (field)
-- low flags: 80
-- high flags: 0001
-- rect: left=86 top=135 right=291 bottom=348
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 20
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: instructions
-- part 44 (button)
-- low flags: 80
-- high flags: A004
-- rect: left=200 top=263 right=287 bottom=250
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: OK
----- HyperTalk script -----
on mouseUp
hide field "instructions"
hide background button id 44
end mouseUp
-- part 45 (field)
-- low flags: 80
-- high flags: 0000
-- rect: left=17 top=0 right=15 bottom=140
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 20
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name:
-- part 48 (button)
-- low flags: 80
-- high flags: 8000
-- rect: left=145 top=257 right=274 bottom=168
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: lbs
----- HyperTalk script -----
on mouseUp
put the number of lines in field "date" into number
repeat with i = 1 to number
if line i of field "weight" is empty then next repeat
put line i of field "weight" into weight
set the numberFormat to "0.00"
put (weight/2.2) into line i of field "weight"
end repeat
hide background button "lbs"
show background button "kgs"
end mouseUp
-- part 49 (button)
-- low flags: 00
-- high flags: 8000
-- rect: left=145 top=257 right=274 bottom=168
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: kgs
----- HyperTalk script -----
on mouseUp
put the number of lines in field "date" into number
repeat with i = 1 to number
if line i of field "weight" is empty then next repeat
put line i of field "weight" into weight
set the numberFormat to "0.00"
put (weight*2.2) into line i of field "weight"
end repeat
hide background button "kgs"
show background button "lbs"
end mouseUp
-- part 50 (button)
-- low flags: 80
-- high flags: 8000
-- rect: left=206 top=257 right=274 bottom=229
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: in
----- HyperTalk script -----
on mouseUp
put the number of lines in field "date" into number
repeat with i = 1 to number
if line i of field "height" is empty then next repeat
put line i of field "height" into height
set the numberFormat to "0.00"
put (height*2.54) into line i of field "height"
end repeat
hide background button "in"
show background button "cm"
end mouseUp
-- part 51 (button)
-- low flags: 00
-- high flags: 8000
-- rect: left=206 top=257 right=274 bottom=229
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: cm
----- HyperTalk script -----
on mouseUp
put the number of lines in field "date" into number
repeat with i = 1 to number
if line i of field "height" is empty then next repeat
put line i of field "height" into height
set the numberFormat to "0.00"
put (height/2.54) into line i of field "height"
end repeat
hide background button "cm"
show background button "in"
end mouseUp
-- part 53 (button)
-- low flags: 00
-- high flags: A002
-- rect: left=293 top=315 right=342 bottom=360
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Edit data
----- HyperTalk script -----
on mouseUp
set lockText of field "date" to false
set lockText of field "age" to false
set lockText of field "weight" to false
set lockText of field "height" to false
set lockText of field "bone ages" to false
set lockText of field "Phallus Size" to false
set lockText of field "Testes Volume" to false
set lockText of field "Pubic Hair" to false
set lockText of field "Breasts" to false
hide background button "Edit data"
show background button "Lock data"
end mouseUp
-- part 54 (button)
-- low flags: 80
-- high flags: A002
-- rect: left=293 top=315 right=342 bottom=361
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Lock data
----- HyperTalk script -----
on mouseUp
set lockText of field "date" to true
set lockText of field "age" to true
set lockText of field "weight" to true
set lockText of field "height" to true
set lockText of field "bone ages" to true
set lockText of field "Phallus Size" to true
set lockText of field "Testes Volume" to true
set lockText of field "Pubic Hair" to true
set lockText of field "Breasts" to true
hide background button "Lock data"
show background button "Edit data"
end mouseUp
-- part 55 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=3 top=277 right=294 bottom=68
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 20
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: enter date
-- part 56 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=139 top=276 right=294 bottom=193
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 20
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: enter weight
-- part 57 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=199 top=276 right=294 bottom=253
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 20
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: enter height
-- part 58 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=260 top=276 right=294 bottom=314
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 20
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: enter bone age
-- part 59 (button)
-- low flags: 00
-- high flags: A002
-- rect: left=165 top=315 right=342 bottom=242
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Enter data
----- HyperTalk script -----
on mouseUp
get the location of field "enter date"
put field "birth date" into birthdate
click at it
if field "enter date" is empty then
answer "Enter the date and growth data!" with "OK"
else
put the number of lines of field "date" into linumber
put (linumber-15) into setscroll
if setscroll>0 then
set scroll of field "date" to setscroll*13
end if
get the scroll of field "date"
goalign
get field "enter date"
convert it to short date
put it into line (linumber+1) of field "date"
convert birthdate to seconds
convert it to seconds
subtract birthdate from it
divide it by (365.25*24*6*6)
put round(it) into age
divide age by (100)
put age into line (linumber+1) of field "age"
put field "enter weight" into line (linumber+1) of field "weight"
put field "enter height" into line (linumber+1) of field "height"
put field "enter bone age" into line (linumber+1) of field "bone ages"
put field "eBreasts" into line(linumber+1) of field "Breasts"
put field "ePubic Hair" into line(linumber+1) of field "Pubic Hair"
if field "sex" is "f" and field "Testes" is not empty then
answer "Females usually do not have testes" with "OK"
put empty into field "testes"
end if
put field "Testes" into line(linumber+1) of field "Testes Volume"
put field "ePhallus Size" into line(linumber+1) of field "Phallus Size"
put empty into field "enter date"
put empty into field "enter weight"
put empty into field "enter height"
put empty into field "enter bone age"
put empty into field "eBreasts"
put empty into field "ePubic Hair"
put empty into field "Testes"
put empty into field "ePhallus Size"
get the location of field "enter date"
click at it
end if
end mouseUp
-- part 60 (button)
-- low flags: 00
-- high flags: A002
-- rect: left=92 top=315 right=342 bottom=166
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Functions
----- HyperTalk script -----
on mousedown
global identification, ages, plotdata, currentfield
put the mouseloc into myPlace
put item 1 of myPlace - 13 into horiz
put item 2 of myPlace - 150 into vert
put "Plot Data;Calculate Ages;Calculate Height Velocity;Show velocity time interval;Height Z Scores;Height Velocity Z Scores;Height age; Γêé height age over Γêé bone age;Report" into menufunc
get PopUpMenu(menufunc, 1, vert, horiz)
put field "name" && field "hospital number" into identification
put it into Menuitem
if menuitem is 1 then
get the number of lines in field "age"
put it into ages
get field "sex"
if it is empty then
ask "what is the sex of this patient (m or f)?"
put it into field "sex"
end if
put "true" into plotdata
if it is "m" then
go to card "Male plot"
end if
if it is "f" then
go to card "Female plot"
end if
end if
if menuitem is 2 then
put number of lines in field "date" into maxdate
repeat with i = 1 to maxdate
put line i of field "date" into temp
if temp is not empty then
convert temp to short date
put temp into line i of field "date"
end if
put field "birth date" into birthdate
if temp is not empty then
convert birthdate to seconds
convert temp to seconds
subtract birthdate from temp
divide temp by (365.25*24*6*6)
put round(temp) into age
divide age by (100)
put age into line i of field "age"
end if
end repeat
end if
if menuitem is 3 then
hide field currentfield
put "growth velocity" into currentfield
put currentfield into field "title"
show field currentfield
put empty into field "growth velocity"
put the number of lines of field "date" into number
set the numberformat to "0.##"
put (field "minimum interval"/12) && "yrs" into field "yrs conversion"
if field "minimum interval" < 1 then
repeat with i=1 to (number-1)
if line i of field "height" is empty then next repeat
put (i+1) into steps
repeat with j=steps to number
if line j of field "height" is empty then next repeat
put ((line(j) of field "height")- (line i of field "height")) into deltaheight
put ((line(j) of field "age")- (line i of field "age")) into deltaage
put (deltaheight/deltaage) into line (j) of field "growth velocity"
if (line (j) of field "height") is not empty then exit repeat
end repeat
end repeat
else
repeat with i = number down to 1
if line i of field "height" is empty then next repeat
put line i of field "age" into topage
put (number-(number-i)-1) into start
repeat with j= start down to 1
if line j of field "height" is empty then next repeat
put line j of field "age" into nextage
put (topage-nextage) into deltaage
if deltaage < (field "minimum interval"/12) then next repeat
put ((line i of field "height")- (line j of field "height")) into deltaheight
put (deltaheight/deltaage) into line (i) of field "growth velocity"
exit repeat
end repeat
end repeat
end if
end if
if menuitem is 4 then
show field "minimum interval"
put "months" into field "interval title"
show field "interval title"
show background button "ok"
show field "yrs conversion"
end if
if menuitem >4 then
answer "Not implemented at this time!" with "OK"
end if
end mousedown
-- part 61 (button)
-- low flags: 00
-- high flags: 8002
-- rect: left=58 top=315 right=342 bottom=93
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Files
----- HyperTalk script -----
on mousedown
global identification, plotdata
put the mouseloc into myPlace
put item 1 of myPlace - 13 into horiz
put item 2 of myPlace - 125 into vert
put "Patient Index;Patient Medicines;Growth Patterns;Find what?;Align data lines;Go to male charts;Go to female charts" into menufunc
get PopUpMenu(Menufunc, 1, vert, horiz)
put field "name" && field "hospital number" into identification
put it into Menuitem
if menuitem is 3 then
go to card id 5522
end if
if menuitem is 1 then
visual effect barn door close slow
go "Patient names"
end if
if menuitem is 2 then
Answer "Not available for this copy"
end if
if menuitem is 4 then
ask "What do you want to find?"
find it
if it is "OK" then
doMenu "Find..."
end if
end if
if menuitem is 5 then
goalign
end if
if menuitem is 6 then
put "false" into plotdata
go to card "Male plot"
end if
if menuitem is 7 then
put "false" into plotdata
go to card "Female plot"
end if
end mousedown
-- part 62 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=325 top=276 right=292 bottom=368
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 20
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: eBreasts
-- part 63 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=371 top=276 right=292 bottom=414
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 20
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: ePubic Hair
-- part 64 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=417 top=276 right=292 bottom=460
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 20
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: Testes
-- part 65 (field)
-- low flags: 00
-- high flags: 4000
-- rect: left=463 top=276 right=292 bottom=506
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 20
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: ePhallus Size
-- part 66 (button)
-- low flags: 00
-- high flags: A002
-- rect: left=359 top=315 right=342 bottom=435
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Other data
----- HyperTalk script -----
on mouseDown
global currentfield
put the mouseloc into myPlace
put item 1 of myPlace - 25 into horiz
put item 2 of myPlace - 85 into vert
put "Bone Ages;Breast Maturation;Pubic Hair;Testes Size;Phallus Size" into menufunc